public class demo2_8 {
    public static void main(String[] args) {
        int x = 10;
        short y = 20;
        String s = "A";
        //判断x>1,结果为真，输出第一个值，结果为假，输出第二个值
        Object z = x > 1 ? x : y;
        System.out.println(z);// 输出10.0
    }
}